<template>
	<view class="">
		<view class="home_content"  v-for="item in doctor">
			<view class="header_">
				<view class="header_top">
					<image :src="dingwei" class="ding_wei" mode="aspectFill"></image>
					<text class="header_title">{{item.name}}</text>
					<view class="header_Tagging">免疫</view>
					<view class="header_icon">
						<uni-icon size="30" type="map" color="#2989d8" @click="switchActive(index)"></uni-icon>
					</view>
				</view>
				<view class="header_address">
					地址：{{item.address}}
				</view>
				<view class="header_time">
					时间：{{item.time}}
				</view>
			</view>
			<view class="home_map">
				<img class="home_map_content" :src="dogmap" alt="">
			
			</view>
		</view>
	</view>
</template>
<script>
	import dingwei from '@/static/dog/icon/dingwei.png'
	import dogmap from '@/static/dog/map.png'
	import uniIcon from '@/components/uni-icon'
	export default {
		props: {
			doctor: {
				type: Array,
				default: []
			}
		},
		components: {
			uniIcon
		},
		data() {
			return {
				dingwei,
				dogmap,
				latitude: 39.909,
				longitude: 116.39742,
				covers: [{
					latitude: 39.9085,
					longitude: 116.39747,
					// #ifdef APP-PLUS
					// iconPath: '../../../static/app-plus/location@3x.png',
					// #endif
					// #ifndef APP-PLUS
					// iconPath: '../../../static/location.png',
					// #endif
				}]
			}
		},
		methods: {
			switchActive(index) {
				console.log(index);
			}
		},
		watch: {},

		onReachBottom() { //页面上拉触底事件的处理函数

		},
		onPullDownRefresh() { //监听用户下拉动作，一般用于下拉刷新
			//需要在 pages.json 里，找到的当前页面的pages节点，并在 style 选项中开启 enablePullDownRefresh
			//uni.startPullDownRefresh(); 开启
			// uni.stopPullDownRefresh(); 关闭
		},
		onUnload() { //监听页面卸载

		},
		onHide() { //监听页面隐藏

		},
		onLoad() { // 替代 created 监听页面加载，其参数为上个页面传递的数据，参数类型为Object（用于页面传参），参考示例

		},
		onReady() { //替代 mounted 监听页面初次渲染完成

		},

		onShow() { //监听页面显示
			//生命周期

		}
	}
</script>
<style lang="scss" scoped>
	.home_content {
		width: 90%;
		height: 500upx;
		// border-bottom: 1px solid royalblue;
		margin: auto;
		background: white;

	}

	.header_ {
		width: 100%;
		height: 160upx;
		// border-bottom: 1px solid red;

		.header_top {
			width: 100%;
			height: 80upx;
			// border-bottom: 1px solid blue;
			display: flex;

			.ding_wei {
				width: 40upx;
				height: 40upx;
				margin-top: 20upx;
				background-size: 100% 100%;
			}

			.header_title {
				display: block;
				height: 100%;
				line-height: 80upx;
				text-indent: 15upx;
			}

			.header_Tagging {
				border-radius: 5px;
				border: 1px solid red;
				height: 40upx;
				width: 88upx;
				margin-top: 20upx;
				margin-left: 20upx;
				text-align: center;
				font-size: 11px;
				color: red;
				line-height: 20px;
			}

			.header_icon {
				position: relative;
				left: 36%;
				float: right;
				height: 100%;
			}
		}

		.header_address {
			width: 100%;
			height: 40upx;
			line-height: 40upx;
			font-size: 11px;
			color: #3f3f3f;
		}

		.header_time {
			width: 100%;
			height: 40upx;
			line-height: 40upx;
			font-size: 11px;
			color: #3f3f3f;
		}
	}

	.home_map {
		width: 100%;
		height: 340upx;
		margin-top: 16upx;
	}

	.home_map_content {
		height: 300upx;
		width: 100%;
		background-size: 100% 100%;
	}
</style>
